<% layout("../../includes/layout-list-v2") -%>
<!-- ------------------------------------OPENING------------------------------------------ -->
	<div class="box-body" >
			<div class="box box-info searchField" >
					<form id="form" class="form-submission-search backend" title="<%-controller%>" action='' method='post' onsumbit="return myFunction()" > 
						<br/>
						<div class="row">
							
							<div class="col-lg-3">
								<div class="input-group">
									<span class="input-group-addon"> Address </span> <input name="name"
										value="<%-record['name'] -%>" type="text" class="form-control">
								</div>
								<!-- /input-group -->
							</div>
							<!-- /.col-lg-2 -->
							<div class="col-lg-3">
								<div class="input-group">
									<span class="input-group-addon"> Contact Person (Username) </span> <input name="user.username"
										type="text" value="<%-record['user.username'] -%>" class="form-control">
								</div>
								<!-- /input-group -->
							</div>
							<!-- /.col-lg-2 -->
	
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<button class="btn btn-default " type="submit">Search</button>
						</div>
						<!-- /.row -->
						<br />
					</form>
			</div>
	</div>						
<!-- ------------------------------------CLOSING------------------------------------------ -->

<table class="table table-bordered">
	<tr>
		<th>Branch</th>
		<th>Contact Person</th>
		<th>Date Added</th>
		<th width="120px">Action</th>
	</tr>
	<% if(records.length){ for(var i = 0;i < records.length;i++) { %>
	<tr>
		<td><%=records[i].name%></td>
		<td><%=records[i].user_firstname + ' ' + records[i].user_lastname%></td>
		<td><%=records[i].date_added%></td>
		<td>
			<% include ../../includes/actions %>
		</td>
	</tr>
	<% } }else{ %>
	<tr>
		<td colspan="6">No Branch</td>
	</tr>
	<% } %>
</table>

